<?php

/**
 * BasesfGuardFormSignin
 *
 * @package    sfDoctrineGuardPlugin
 * @subpackage form
 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
 * @author     Jonathan H. Wage <jonwage@gmail.com>
 * @version    SVN: $Id: BasesfGuardFormSignin.class.php 25546 2009-12-17 23:27:55Z Jonathan.Wage $
 */
class sfGuardFormSUAPSignin extends sfGuardFormSignin
{

    public function configure(){
        parent::configure();

        $this->widgetSchema['username']->setLabel('Usuario: ');
        $this->widgetSchema['password']->setLabel('Contraseña');
        $this->widgetSchema['remember']->setLabel('recordarme'); 
        
        $this->widgetSchema['remember'] = new sfWidgetFormInputHidden();

        $this->validatorSchema['username']->setOption('required', false);
        $this->validatorSchema['password']->setOption('required', false);
        
        $this->validatorSchema->setPostValidator(new sfGuardValidatorSUAPUser());        
//
    }

//    $this->setValidators(array(
//      'username' => new sfValidatorString(),
//      'password' => new sfValidatorString(),
//      'remember' => new sfValidatorBoolean(),
//    ));
//
//    if (sfConfig::get('app_sf_guard_plugin_allow_login_with_email', true))
//    {
//      $this->widgetSchema['username']->setLabel('Username or E-Mail');
//    }
//
//    $this->validatorSchema->setPostValidator(new sfGuardValidatorUser());
//
//    $this->widgetSchema->setNameFormat('signin[%s]');
//  }
}